using System;
using System.Collections.Generic;
using System.Text;

namespace Avanzis.Helpers.PersistentObjects
{
    public interface ISessionFactoryHolder
    {
        /// <summary>
        /// Creates a session for the associated type
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        Session CreateSession(Type type);

        /// <summary>
        /// Releases the specified session
        /// </summary>
        /// <param name="session"></param>
        void ReleaseSession(Session session);
        
        /// <summary>
        /// Gets or sets the implementation of <see cref="IThreadScopeInfo"/>
        /// </summary>
        IThreadScopeInfo ThreadScopeInfo { get; set; }
    }
}
